@extends('host.common.common')
@section('head')
    <script type="text/javascript">
        var PAGE_DATA = {
            pagingObj : {
                total : 0,
                pageSize : 7,
                page : 1
            }
        };
    </script>
    <script src="/assets/b2b/js/pageConfig.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/underscore-min.js"></script>
     <script type="text/javascript" src="/assets/b2b/js/libs/page/template-util.js"></script>

    @stop
    @section('body')
            <!-- top_test -->
    <div id="top_test"></div>

    <!-- web_logo_search -->
    <div id="web_logo_search"></div>

    <!-- comm_nav -->
    <div id="comm_nav"></div>

    <div class="com-w mt20">
        <div class="look-shopping-cart">
            <div class="shopping-cart-top">
                <div class="cart-top-left">
                    <span class="cart-bg"></span>
                    <span class="f20 lh90 ml15">您购物车中的商品</span>
                </div>
                <div class="cart-top-right">
                    <div class="top-right-logo"></div>
                </div>
            </div>
            <div class="shopping-cart-main" id="cart-line">

            </div>
            <div class="comm-paging" style="  margin-left: 330px;margin-top: 43px;"></div>
            <div class="car-shop-bottom clearfix">
                <div class="shop-total fr mr30 wbb"><span class="f18 b002 lh30" id="total" total="">￥0.00</span><span class="lh30 f14">商品总价：</span></div>
                <br>
                <div class="shop-tow-btn fr wbb">
                    <a class="btn btn-important btn-w130x42 lh28  mr10 fr" href="{{route('order.sure')}}">填写并确认订单</a>
                    <a class="btn btn-default btn-w90x42 lh28 mr10 fr" href="{{route('merchant.index')}}" style="display: block">继续购物</a>
                </div>
            </div>
        </div>
    </div>
    <!-- foot_nav -->
    <div id="foot_nav"></div>
    <div id="bottom_main"></div>

    <!-- 购物车列表 -->
    <script type="text/template" id="cart-template">
        <%_.each(obj, function(item){%>
        <div class="car-shop-list">
            <div class="cart-main-top lh32" data-id="<%=item.shopid%>">
                <span class="c-999">店铺:</span>
                <span class="c-coffee"><%=item.shopname%></span>
            </div>
            <div class="head">
                <ul>
                    <li class="wb10">图片</li>
                    <li class="wb20">商品名称</li>
                    <li class="wb15">规格</li>
                    <li class="wb10">价格</li>
                    <li class="wb15">数量</li>
                    <li class="wb10">小计</li>
                    <li class="wb20">操作</li>
                </ul>
            </div>
            <div class="cart-main">
                <%_.each(item.pros, function(it){%>
                <ul class="clearfix" data-id="<%=it.proid%>">
                    <li class="wb10 clearfix shop-list-img">
                        <a href=" <%=it.href%>" >
                        <img src=" <%=it.img%>"></li>
                       </a>
                    <li class="wb20 ">
                        <a href=" <%=it.href%>" >
                                    <span class="tl shop-names f14 c-coffee">
                                        <%=it.name%>
                                    </span>
                        </a>
                    </li>
                    <li class="wb15 f14 b002"><span class="f14 fl wbb" style="margin-top: 42px;"> <%=it.spec%></span></li>
                    <li class="wb10 f14 b002" id="price_<%=it.proid%>" price="<%=it.price%>">￥ <%=it.price%></li>
                    <li class="wb15">
                                <span class="overall-add">
                                    <a href="javascript:void(0)">
                                        <span class="add-1" onclick="countCartNum('<%=it.proid%>',-1)"></span>
                                    </a>
                                    <span class="inp-text">
                                        <input type="text" value="<%=it.num%>" id="num_<%=it.proid%>" code="<%=it.proid%>"></span>
                                    <a href="javascript:void(0)">
                                        <span class="add-2" onclick="countCartNum('<%=it.proid%>',1)"></span>
                                    </a>
                                </span>
                    </li>
                    <li class="wb10 f14 b002" id="sub_<%=it.proid%>">￥ <%=it.subtotal%></li>
                    <li class="wb20">
                       {{-- <div class="btn btn-default btn-w90x32">加入收藏夹</div>--}}
                        <div class="btn btn-default btn-w90x33">删除</div>
                    </li>
                </ul>
                <%});%>
            </div>
        </div>

        <%});%></script>
    <!-- 删除确认框 -->
    <script type="text/template" id="item-confirm">
        <div class="dialog-div">
            <div>是否确认删除该商品?</div>
            <div class="price-game-btn">
                <div class="btn btn-gray btn-w140x40 remove">取消</div>
                <div class="btn btn-warn btn-w140x40" id="tj">提交</div>
            </div>
        </div>
    </script>
    <!-- 收藏确认框 -->
    <script type="text/template" id="sc-confirm">
        <div class="dialog-div">
            <div>是否确认收藏该商品?</div>
            <div class="price-game-btn">
                <div class="btn btn-gray btn-w140x40 remove">取消</div>
                <div class="btn btn-warn btn-w140x40" id="tj">提交</div>
            </div>
        </div>
    </script>

    <script type="text/javascript" src="/assets/b2b/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/js/pageModules/common/C16.js"></script>
@stop

